<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>post提交</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body background="../photo/IMG_20151101_140701_1447125580864.jpg">
<?php
   
   if(empty($_POST[name]))
   {
   echo "用户名不能为空。";
   }
   elseif((strlen($_POST[name])<3)||(strlen($_POST[name])>10))
  {
  echo "用户名应在3到10之间。";
  }
   elseif(ereg("[$number>=45217&&$number<=55359]+",$_POST[name]))
   {
   echo "用户名格式不正确。";
   }
   
   elseif(empty($_POST[password]))
   echo "密码不能为空。";
   elseif(empty($_POST[passwords]))
   echo "您还未确认密码。";
   elseif($password!=$passwords)
	echo "密码不一致，请重新输入";
   else
   {
   echo "用户名为：$_POST[name]<p>";
   echo "性别为：$_POST[password]<p>";
   echo "<script>alert('注册成功'),location='fort1.php';</script>";
   }
   
?>
<a href="zhuce.php" title="返回首页">返回首页</a> 
</body>
</html>
